package com.goldman.aplt.base.type;

import com.baomidou.mybatisplus.annotation.EnumValue;
import com.baomidou.mybatisplus.core.toolkit.StringUtils;
import com.fasterxml.jackson.annotation.JsonValue;
import com.goldman.aplt.util.CommUtil;
import lombok.*;

import java.io.Serializable;

/**
 * 公用枚举类定义
 */
public interface BaseEnumType {
    public static enum E_YESORNO {
        YES("YES", "Y", "YES", "YES"),
        NO("NO", "N", "NO", "NO");
        private String id;
        @EnumValue
        @JsonValue
        private String value;
        private String longname;
        private String desc;

        private E_YESORNO(String id, String value, String longname, String desc) {
            this.id = id;
            this.value = value;
            this.longname = longname;
            this.desc = desc;
        }

        public String getId() {
            return id;
        }

        public String getValue() {
            return value;
        }

        public String getLongname() {
            return longname;
        }

        public String getDesc() {
            return desc;
        }

        public String toString() {
            return String.valueOf(this.value);
        }
    }

    public static enum E_SEQBUILDCLASS {
        /**
         * A - identification section
         * 标识
         */
        RECOGNITION("RECOGNITION", "A", "identification section", "identification section"),
        /**
         * B - serial number
         * 顺序号
         */
        SEQUENCE("SEQUENCE", "B", "serial number", "serial number"),
        /**
         * C - check bit
         * 校验位
         */
        CHECKBIT("CHECKBIT", "C", "check bit", "check bit"),
        /**
         * S - constants
         * 常量
         */
        CONSTANTS("CONSTANTS", "S", "constants", "constants");
        private String id;
        @EnumValue
        @JsonValue
        private String value;
        private String longname;
        private String desc;

        E_SEQBUILDCLASS(String id, String value, String longname, String desc) {
            this.id = id;
            this.value = value;
            this.longname = longname;
            this.desc = desc;
        }

        public String getId() {
            return id;
        }

        public String getValue() {
            return value;
        }

        public String getLongname() {
            return longname;
        }

        public String getDesc() {
            return desc;
        }

        public String toString() {
            return String.valueOf(this.value);
        }
    }

    public static enum E_PADDINGMODE {
        /**
         * L - left padding
         * 左补齐
         */
        LEFT("LEFT", "L", "left padding", "left padding"),
        /**
         * R - right padding
         * 右补齐
         */
        RIGHT("RIGHT", "R", "right padding", "right padding");
        private String id;
        @EnumValue
        @JsonValue
        private String value;
        private String longname;
        private String desc;

        E_PADDINGMODE(String id, String value, String longname, String desc) {
            this.id = id;
            this.value = value;
            this.longname = longname;
            this.desc = desc;
        }

        public String getId() {
            return id;
        }

        public String getValue() {
            return value;
        }

        public String getLongname() {
            return longname;
        }

        public String getDesc() {
            return desc;
        }

        public String toString() {
            return String.valueOf(this.value);
        }
    }

    public static enum E_CYCLETYPE {
        /**
         * D - day
         * 天
         */
        DAY("DAY", "D", "day"),
        /**
         * W - week
         * 周
         */
        WEEK("WEEK", "W", "week"),
        /**
         * M - month
         * 月
         */
        MONTH("MONTH", "M", "month"),
        /**
         * Q - quarter
         * 季
         */
        QUARTER("QUARTER", "Q", "quarter"),
        /**
         * H - half year
         * 半年
         */
        HALF_YEAR("HALF_YEAR", "H", "half year"),
        /**
         * Y - year
         * 年
         */
        YEAR("YEAR", "Y", "year");

        private String id;
        @EnumValue
        @JsonValue
        private String value;
        private String longName;

        private E_CYCLETYPE(String id, String value, String longName) {
            this.id = id;
            this.value = value;
            this.longName = longName;
        }

        public String getId() {
            return id;
        }

        public void setId(String id) {
            this.id = id;
        }

        public String getValue() {
            return value;
        }

        public void setValue(String value) {
            this.value = value;
        }

        public String getLongName() {
            return longName;
        }

        public void setLongName(String longName) {
            this.longName = longName;
        }

        public String toString() {
            return String.valueOf(this.value);
        }

        public static boolean isIn(String value) {
            for (E_CYCLETYPE cycle : E_CYCLETYPE.values()) {
                if (value.equals(cycle.getValue())) {
                    return true;
                }
            }
            return false;
        }
    }

    public static enum E_SEX {
        /**
         * L - left padding
         * 左补齐
         */
        MALE("MALE", "M", "male", "male"),
        /**
         * R - right padding
         * 右补齐
         */
        FMALE("FMALE", "F", "fmale", "fmale");
        private String id;
        @EnumValue
        @JsonValue
        private String value;
        private String longname;
        private String desc;

        E_SEX(String id, String value, String longname, String desc) {
            this.id = id;
            this.value = value;
            this.longname = longname;
            this.desc = desc;
        }

        public String getId() {
            return id;
        }

        public String getValue() {
            return value;
        }

        public String getLongname() {
            return longname;
        }

        public String getDesc() {
            return desc;
        }

        public String toString() {
            return String.valueOf(this.value);
        }
    }

    @Getter
    @ToString
    @AllArgsConstructor
    @NoArgsConstructor
    public static enum E_COREPRODTYPE {
        PAIO("0", "02010301", "PAIO", E_ACCT_TYPE.CURRENT, null, E_CUSTTYPE.PERSON, "个人aio主产品"),
        PFLEX("1", "02010102", "PFLEX", E_ACCT_TYPE.FLE, E_PROD_CATEGORY.FLE, E_CUSTTYPE.PERSON, "个人零钱通"),
        PFIX("2", "02010201", "PFIX", E_ACCT_TYPE.FIX, E_PROD_CATEGORY.FIX,  E_CUSTTYPE.PERSON, "个人整存整取定期"),
        PCURRENT("3", "02010101", "PCURRENT", E_ACCT_TYPE.CURRENT, E_PROD_CATEGORY.CURRENT,  E_CUSTTYPE.PERSON, "个人活期产品"),
        LK_SAVINGS("6", "02010105", "LK_SAVINGS", E_ACCT_TYPE.LK, E_PROD_CATEGORY.LK, E_CUSTTYPE.PERSON, "个人锁定存"),
        MEMBER_DEPOSIT("10", "02010101", "MEMBER_DEPOSIT", E_ACCT_TYPE.MDCURRENT, E_PROD_CATEGORY.MDCURRENT, E_CUSTTYPE.PERSON, "会员存款"),

        CAIO("4", "02020301", "CAIO", E_ACCT_TYPE.CURRENT, null, E_CUSTTYPE.CORPORATE, "企业aio主产品"),
        CCURRENT("5", "02020101", "CCURRENT",  E_ACCT_TYPE.CURRENT, E_PROD_CATEGORY.CURRENT, E_CUSTTYPE.CORPORATE, "企业活期产品"),
        CFLEX("6", "02020102", "CFLEX", E_ACCT_TYPE.FLE, E_PROD_CATEGORY.FLE, E_CUSTTYPE.CORPORATE, "企业零钱通"),
        CFIX("7", "02020201", "CFIX", E_ACCT_TYPE.FIX, E_PROD_CATEGORY.FIX, E_CUSTTYPE.CORPORATE, "企业整存整取定期"),

//        LOAN_NEWEDGE_INTERNAL("8", "02020601", "NEWEDGE", null, "", "NEWEDGE"),
        CVIRACCT("9", "02020103", "CVIRACCT", E_ACCT_TYPE.CURRENT, E_PROD_CATEGORY.CURRENT, E_CUSTTYPE.CORPORATE, "企业虚拟子账户");

        private String id;
        @EnumValue
        @JsonValue
        private String value;
        private String longname;
        private E_ACCT_TYPE acctType;
        private E_PROD_CATEGORY prodCategory;
        private E_CUSTTYPE custType;
        private String desc;

        public static E_COREPRODTYPE getCoreProdType(E_ACCT_TYPE acctType, E_CUSTTYPE custType) {
            for (E_COREPRODTYPE code : values()) {
                if (code.acctType == acctType && code.custType == custType) {
                    return code;
                }
            }
            return null;
        }
//
        public static E_COREPRODTYPE getCoreProdType(E_PROD_CATEGORY prodCategory, E_CUSTTYPE custType) {
            for (E_COREPRODTYPE code : values()) {
                if (code.prodCategory == prodCategory && code.custType == custType) {
                    return code;
                }
            }
            return null;
        }

        public static E_PROD_CATEGORY getProdCategory(String coreProd) {
            E_COREPRODTYPE[] codes = values();
            for (E_COREPRODTYPE code : codes) {
                if (code.value.equals(coreProd)) {
                    return code.getProdCategory();
                }
            }
            return null;
        }

        public static E_ACCT_TYPE getAcctType(String coreProd) {
            E_COREPRODTYPE[] codes = values();
            for (E_COREPRODTYPE code : codes) {
                if (code.value.equals(coreProd)) {
                    return code.getAcctType();
                }
            }
            return null;
        }

        public static String getId(String value) {
            E_COREPRODTYPE[] codes = values();
            for (E_COREPRODTYPE code : codes) {
                if (code.value.equals(value)) {
                    return code.getId();
                }
            }
            return "unknow id";
        }

        public static String getValue(String id) {
            E_COREPRODTYPE[] codes = values();
            for (E_COREPRODTYPE code : codes) {
                if (code.id.equals(id)) {
                    return code.getValue();
                }
            }
            return "unknow value";
        }
    }

    @Getter
    @ToString
    @AllArgsConstructor
    @NoArgsConstructor
    public static enum E_PROD_CATEGORY {
        FLE("0", "1", "INVESTMENT_PROD", "理财"),
        FIX("1", "2", "REGULAR", "定期"),
        CURRENT("2", "3", "CURRENT", "活期"),
        LOANS("3", "4", "LOANS", "贷款"),
        MDCURRENT("4", "5", "Member Deposit", "Member Deposit"),
        LK("5", "6", "Locked Savings", "Locked Savings")
        ;
        private String id;
        @EnumValue
        @JsonValue
        private String value;
        private String longname;
        private String desc;
    }

    @Getter
    @ToString
    @AllArgsConstructor
    @NoArgsConstructor
    public static enum E_ACCT_TYPE {
        FLE("1", "FLE", "零钱通"),
        FIX("2", "FIX", "定期"),
        CURRENT("3", "CURRENT", "普通活期"),
        MDCURRENT1("4", "Member Deposit", "Member Deposit"),
        MDCURRENT("5", "Member Deposit", "Member Deposit"),
        LK("6", "Locked Savings", "Locked Savings");
        @EnumValue
        @JsonValue
        private String value;
        private String longname;
        private String desc;
    }

    /**
     * 默认的账户序号
     */
    @Getter
    @ToString
    @AllArgsConstructor
    @NoArgsConstructor
    public static enum E_ACCT_SEQ {
        PAIO("0", "0", "PAIO SEQ", "个人aio主账户序号"),
        PFLEX("2", "2", "PFLEX SEQ", "个人零钱通账户序号"),
        PCURRENT("1", "1", "PCURRENT SEQ", "个人活期账户序号");

        private String id;
        @EnumValue
        @JsonValue
        private String value;
        private String longname;
        private String desc;
    }

    @Getter
    @ToString
    @AllArgsConstructor
    @NoArgsConstructor
    enum E_DEBITCREDIT {
        DEBIT("DEBIT", "D", "DEBIT", "DEBIT"),
        CREDIT("CREDIT", "C", "CREDIT", "CREDIT");
        private String id;
        @EnumValue
        @JsonValue
        private String value;
        private String longname;
        private String desc;

        public static E_DEBITCREDIT getEnumByValue(String value) {
            E_DEBITCREDIT[] values = values();
            for (E_DEBITCREDIT eDebitcredit : values) {
                if (eDebitcredit.getValue().equals(value)) {
                    return eDebitcredit;
                }
            }
            return null;
        }
    }

    @Getter
    @ToString
    @AllArgsConstructor
    @NoArgsConstructor
    public static enum E_TRAN_TYPE {
        ADD_MONEY("0", "FP03", "inter-bank Transfer in", "活期行外转入"),
        TRANSFER("1", "FP01", "inter-bank Transfer Out", "活期行外转出"),
        REDEPOSIT_FIXED_SAVING("2", "4150", "Save-Fixed Savings", "活期购买定期"),
        REDEPOSIT_FLEXSAVE("3", "4154", "Save-Flexsave", "活期购买存款零钱通"),
        REDEPOSIT_FIXED_SAVING_REVERSE("4", "4151", "Redeposit-Fixed Savings-Reverse", "活期存款购买定期产品（转出-冲正"),
        SAVE_FIXED_SAVING("5", "4152", "Save-Fixed Savings", "定期产品存入"),
        SAVE_FIXED_SAVING_REVERSE("6", "4153", "Save-Fixed Savings-Reverse", "定期产品存入-冲正"),
        REDEPOSIT_FLEXSAVE_REVERSE("7", "4155", "Redeposit-Flexsave-Reverse", "活期-结息-零钱通/定期结息"),
        SAVE_FLEXSAVE("8", "4156", "Save-Flexsave", "零钱通产品存入"),
        SAVE_FLEXSAVE_REVERSE("9", "4157", "Save-Flexsave-Reverse", "零钱通产品存入-冲正"),
        WITHDRAW_FLEXSAVE("10", "4158", "Withdraw-Flexsave", "零钱通支取转入活期（转入"),
        WITHDRAW_FLEXSAVE_REVERSE("11", "4159", "Withdraw-Flexsave-Reverse", "零钱通支取转入活期(转入)-冲正"),
        WITHDRAW("12", "4160", "Withdraw", "零钱通产品支取"),
        WITHDRAW_REVERSE("13", "4161", "Withdraw-Reverse", "零钱通产品支取-冲正"),
        EXPIRY_SETTLE_FIXED_SAVING("14", "4162", " Expiry Settle-Fixed Savings", "定期到期支取转入活期(转入)"),
        EXPIRY_SETTLE_FIXED_SAVING_REVERSE("15", "4163", "Expiry Settle-Fixed Savings-Reverse", "定期到期支取转入活期（转入）-冲正"),
        EXPIRYW_ITHDRAW("16", "4164", "Expiry Withdraw", "定期产品到期支取"),
        EXPIRY_WITHDRAW_REVERSE("17", "4165", "Expiry Withdraw-Reverse", "定期产品到期支取-冲正"),
        EARLY_SETTLE_FIXED_SAVING("18", "4166", "Early Settle-Fixed Savings", "定期提前支取转入活期（转入）"),
        EARLY_SETTLE_FIXED_SAVING_REVERSE("19", "4167", "Early Settle-Fixed Savings-Reverse", "定期提前支取转入活期（转入）-冲正"),
        EARLY_WITHDRAW("20", "4168", "Early Withdraw", "定期产品提前支取"),
        EARLY_WITHDRAW_REVERSE("21", "4169", "Early Withdraw-Reverse", "定期产品提前支取-冲正"),
        TRANSFER_PROCESSING_FEE("22", "FEE2", "Transfer Processing Fee", "转账手续费"),
        TRANSFER_PROCESSING_FEE_REVERSE("23", "FEE3", "Transfer Processing Fee-Reverse", "转账手续费-冲正"),
        SMS_FEE("24", "FEE8", "SMS fee", "短信手续费"),
        SMS_FEE_REVERSE("25", "FEE9", "SMS fee-Reverse", "短信手续费-冲正"),
        SETTLE_INTERESTS("26", "5000", "Settle Interests", "贷方利息资本化(系统结息)-零钱通/定期结息"),
        SETTLE_INTERESTS_1("27", "5001", "Settle Interests", "贷方利息调整入账(单户结息)-定期转存（结息入活期"),
        TRANSFER_INTERN("28", "4186", "inner-bank transfer out", "行内转账支取（转出)"),
        TRANSFER_INTERN_RE("29", "4187", "Transfer-Reverse", "行内转账支取（转出)-冲正"),
        ADD_MONEY_INTERN("30", "4189", "inner-bank transfer in", "行内转账存入（转入)"),
        ADD_MONEY_INTERN_RE("31", "4190", "Add Money-Reverse", "行内转账存入（转入)-冲正"),
        TRANSFER_PROCESSING_FEE2("32", "FEE1", "Transfer Processing Fee", "转账手续费"),
        TRANSFER_PROCESSING_FEE_REVERSE2("33", "FEER", "Transfer Processing Fee-Reverse", "转账手续费-冲正"),
        WIDTHHOLDING_TAX("34", "TAX3", "Withholding tax", "利息税"),
        INTEREST_TRANSFER_OUT("35", "INTC", "Interest transfer out", "利息转出（从定期转出）"),
        SETTLE_INTERESTS_INTD("36", "INTD", "Settle Interests", "结息（从定期转入到活期）"),
        TRANSFER_RE("37", "FP02", "Transfer-Reverse", "活期行外转出冲正"),
        ADD_MONEY_RE("38", "FP04", "Add Money-Reverse", "活期行外转入冲正"),
        CURRENT_SAVING_TRANSFER_INTERN("39", "4141", "Member Deposit-transfer out", "活期转活期子账户（转出)"),
        CURRENT_SAVING_TRANSFER_INTERN_RE("40", "4142", "Member Deposit-transfer out-Reverse", "活期转活期子账户（转出)-冲正"),
        CURRENT_SAVING_ADD_MONEY_INTERN("41", "4143", "Member Deposit-transfer in", "活期子账户转活期（转入)"),
        CURRENT_SAVING_ADD_MONEY_INTERN_RE("42", "4144", "Member Deposit-transfer in-Reverse", "活期子账户转活期（转入)-冲正"),
        FUND_POOL_COLLECTION_AND_DEPOSIT("43", "CP0C", "Fund pool collection and deposit", "资金池归集存入"),
        FUND_POOL_COLLECTION_AND_WITHDRAWAL("44", "CP0D", "Fund pool collection and withdrawal", "资金池归集支取"),
        FUND_POOL_ALLOCATION_AND_DEPOSIT("45", "CP1C", "Fund pool allocation and deposit", "资金池下拨存入"),
        FUND_POOL_ALLOCATION_AND_WITHDRAWAL("46", "CP1D", "Fund pool allocation and withdrawal", "资金池下拨支取"),
        FUND_POOL_COLLECTION_DEPOSIT_OFFSET("47", "CP01", "Fund pool collection deposit-offset", "资金池归集存入-冲销"),
        FUND_POOL_COLLECTION_WITHDRAWAL_OFFSETTING("48", "CP02", "Fund pool collection and withdrawal-offsetting", "资金池归集支取-冲销"),
        FUND_POOL_ALLOCATION_AND_DEPOSIT_OFFSET("49", "CP03", "Fund pool allocation and deposit-offset", "资金池下拨存入-冲销"),
        FUND_POOL_ALLOCATION_AND_WITHDRAWAL_OFFSET("50", "CP04", "Cash pool allocation and withdrawal-offset", "资金池下拨支取-冲销"),
        EB_LOAN_LEND("51", "EBLC", "loan disbursement-transfer in", "EB客户放款"),
        EB_LOAN_REPAYMENT("52", "EBLD", "Entrusted payment-transfer out", "EB客户还款"),
        BILL_PAY_TRANSFER_INTERN("53", "4145", "BillPay", "账单支付"),
        BILL_PAY_TRANSFER_INTERN_RE("54", "4146", "BillPay-Reverse", "账单支付-冲正"),
        INTEREST_TRANSFER_TAX("55", "4170", "Withholding tax", "利息税"),
        INTEREST_TRANSFER_TAX_RE("56", "4171", "Withholding tax reverse", "利息税-冲正"),
        INTEREST_TRANSFER_TAX_1("57", "4172", "Withholding tax", "利息税"),
        INTEREST_TRANSFER_TAX_1_RE("58", "4173", "Withholding tax reverse", "利息税-冲正"),
        SAVE_LOCKEDSAVINGS("59", "4174", "Save-LockedSavings", "锁定存（转出)"),
        SAVE_LOCKEDSAVINGS_RE("60", "4175", "Save-LockedSavings-Reverse", "锁定存（转出)-冲正"),
        EXPIRY_SETTLE_LOCKEDSAVINGS("61", "4176", "Expiry Settle-LockedSavings", "锁定存（转入)"),
        EXPIRY_SETTLE_LOCKEDSAVINGS_RE("62", "4177", "Expiry Settle-LockedSavings-Reverse", "锁定存（转入)-冲正")
        ;

        private String id;
        @EnumValue
        @JsonValue
        private String value;
        private String longname;
        private String desc;

        public static String getLongName(String value) {
            E_TRAN_TYPE[] values = values();
            for (E_TRAN_TYPE code : values) {
                if (code.value.equals(value)) {
                    return code.getLongname();
                }
            }
            return "unknow longname";
        }
    }

    @Getter
    @ToString
    @AllArgsConstructor
    @NoArgsConstructor
    public static enum E_VERIFICATIONMETHOD {
        PIN("PIN", "0", "pin", "pin"),
        OTP("OTP", "1", "otp", "otp"),
        PIN_AND_OTP("PIN_AND_OTP", "2", "pin and otp", "pin and otp"),
        ;

        private String id;
        @EnumValue
        @JsonValue
        private String value;
        private String longname;
        private String desc;
    }

    @Getter
    @ToString
    @AllArgsConstructor
    @NoArgsConstructor
    public static enum E_ACCOUNTLEVEL {
        LEVEL_ONE("LEVEL_ONE", "1", "level one", "level one"),
        LEVEL_TWO("LEVEL_TWO", "2", "level two", "level two"),
        LEVEL_THREE("LEVEL_THREE", "3", "level three", "level three"),
        LEVEL_FOUR("LEVEL_FOUR", "4", "level four", "level four"),
        ;

        private String id;
        @EnumValue
        @JsonValue
        private String value;
        private String longname;
        private String desc;
    }

    @Getter
    @ToString
    @AllArgsConstructor
    @NoArgsConstructor
    public static enum E_CORPOR_ACCOUNTLEVEL {
        LEVEL_ONE("LEVEL_ONE", "31", "level one", "level one"),
        LEVEL_TWO("LEVEL_TWO", "32", "level two", "level two"),
        LEVEL_THREE("LEVEL_THREE", "33", "level three", "level three"),
        LEVEL_FOUR("LEVEL_FOUR", "34", "level four", "level four"),
        ;

        private String id;
        @EnumValue
        @JsonValue
        private String value;
        private String longname;
        private String desc;

        public static E_CORPOR_ACCOUNTLEVEL getObjByValue(String value) {
            E_CORPOR_ACCOUNTLEVEL[] values = values();
            for (E_CORPOR_ACCOUNTLEVEL code : values) {
                if (code.value.equals(value)) {
                    return code;
                }
            }
            return null;
        }
    }

    @Getter
    @ToString
    @AllArgsConstructor
    @NoArgsConstructor
    public static enum E_EKYCSTATUS {
        NOT_PASS("NOT_PASS", "0", "not pass", "not pass"),
        PASSED("PASSED", "1", "passed", "passed"),
        EXPIRED("EXPIRED", "2", "expired", "expired"),
        LOCKED("LOCKED", "3", "locked", "locked"),
        ;

        private String id;
        @EnumValue
        @JsonValue
        private String value;
        private String longname;
        private String desc;
    }

    @Getter
    @ToString
    @AllArgsConstructor
    @NoArgsConstructor
    public static enum E_TRIAL_SCENE {
        DEPOSIT("0", "1", "DEPOSIT", "定期开户利息试算"),
        WITHDRAWAL("1", "2", "WITHDRAWAL", "定期提前支取利息试算"),
        ;

        private String id;
        @EnumValue
        @JsonValue
        private String value;
        private String longname;
        private String desc;
    }

    @Getter
    @ToString
    @AllArgsConstructor
    @NoArgsConstructor
    public static enum E_OTPBUSINESSTYPE {
        BUSINESS_TYPE_REG("BUSINESS_TYPE_REG", "1", "register", "注册"),
        BUSINESS_TYPE_LOGIN("BUSINESS_TYPE_LOGIN", "2", "login", "登录"),
        BUSINESS_TYPE_RESET_PASSWORD("BUSINESS_TYPE_RESET_PASSWORD", "3", "reset password", "重置密码"),
        BUSINESS_TYPE_BIND_PHONE("BUSINESS_TYPE_BIND_PHONE", "4", "bind phone", "绑定手机号"),
        BUSINESS_TYPE_BIND_EMAIL("BUSINESS_TYPE_BIND_EMAIL", "5", "bind email", "绑定邮箱地址"),
        BUSINESS_TYPE_IDENTITY_VERIFICATION_FOR_FIN("BUSINESS_TYPE_IDENTITY_VERIFICATION_FOR_FIN", "6", "identity verify", "KYC 认证"),
        BUSINESS_TYPE_RESET_PAYMENT_PASSWORD_FOR_FIN("BUSINESS_TYPE_RESET_PAYMENT_PASSWORD_FOR_FIN", "7", "reset payment password", "设置支付密码"),
        BUSINESS_TYPE_ADJUST_FOR_FIN("BUSINESS_TYPE_ADJUST_FOR_FIN", "8", "adjust amount", "提额"),
        BUSINESS_TYPE_VERIFY_BANK_STATEMENT("BUSINESS_TYPE_VERIFY_BANK_STATEMENT", "9", "verify bank statement", "银行流水查询"),
        BUSINESS_TYPE_TELE_WITHDRAW("BUSINESS_TYPE_TELE_WITHDRAW", "10", "telephone withdraw", "电销链接放款"),
        BUSINESS_TYPE_DELETE_ACCOUNT("BUSINESS_TYPE_DELETE_ACCOUNT", "11", "delete account", "注销用户"),
        ;

        private String id;
        @EnumValue
        @JsonValue
        private String value;
        private String longname;
        private String desc;
    }

    @Getter
    @ToString
    @AllArgsConstructor
    @NoArgsConstructor
    public static enum E_CORE_FREEZECODE {
        NOPAY_NOINCOME("052", "no pay no income", "不收不付"),
        //        AMOUNT_FREEZE("053", "amount freeze", "部分止付"),
        BANLANCE_NOPAY_NOINCOME("070", "balance no pay no income", "账户限额-不收不付");
        @EnumValue
        @JsonValue
        private String value;
        private String desc;
        private String longname;

        public static boolean isIn(String value) {
            for (E_CORE_FREEZECODE e : values()) {
                if (e.getValue().equals(value)) {
                    return true;
                }
            }
            return false;
        }

        public static E_CORE_FREEZECODE find(String value) {
            for (E_CORE_FREEZECODE type : E_CORE_FREEZECODE.values()) {
                if (StringUtils.isBlank(value)) {
                    throw new RuntimeException("找不到限制类型");
                }

                if (value.equals(type.getValue())) {
                    return type;
                }
            }
            throw new RuntimeException("找不到限制类型");
        }
    }

    @Getter
    @ToString
    @AllArgsConstructor
    @NoArgsConstructor
    public static enum E_PROTOCOL_SCENE {
        REGISTR("A", "1", "REGISTR", "注册"),
        OPEN_ACCOUNT("B", "2", "OPEN_ACCOUNT", "开户"),
        PRODCUT("C", "3", "PRODCUT", "产品（包括零钱通和定期)"),
        TRANSFER("D", "4", "TRANSFER", "转账大额协议"),
        MOVE_ACCOUNT_MESSAGE("D", "5", "MOVE_ACCOUNT_MESSAGE", "动账短信提醒签约"),
        WITHHOLD("E", "6", "withhold", "代扣协议"),
        ;

        private String id;
        @EnumValue
        @JsonValue
        private String value;
        private String longname;
        private String desc;

    }

    @Getter
    @ToString
    @AllArgsConstructor
    @NoArgsConstructor
    public static enum E_ENCRY_TYPE {
        IDCARD("IDCARD", "idcard", "nin/bvn", "证件"),
        PHONE("PHONE", "phone", "phone", "手机号"),
        EMAIL("EMAIL", "email", "email", "邮箱"),
        BANKACCT("BANKACCT", "bankacct", "bankacct", "银行账号");

        private String id;
        @EnumValue
        @JsonValue
        private String value;
        private String longname;
        private String desc;
    }

    @Getter
    @ToString
    @AllArgsConstructor
    @NoArgsConstructor
    public static enum E_ENCRYPTION {
        ENCODE("1", "encode", "encode", "加密"),
        DECODE("2", "decode", "decode", "解密"),
        ;

        private String id;
        @EnumValue
        @JsonValue
        private String value;
        private String longname;
        private String desc;
    }

    @Getter
    @ToString
    @AllArgsConstructor
    @NoArgsConstructor
    public static enum E_LANGUAGE {
        ENGLISH("english", "en-US", "英文", "english");
        private String id;
        @EnumValue
        @JsonValue
        private String value;
        private String longname;
        private String desc;
    }

    @Getter
    @ToString
    @AllArgsConstructor
    @NoArgsConstructor
    public static enum E_ACS_VERSION_TERM {
        SEVEN_DAY("1", "1", "seven day", "7天"),
        ONE_WEEK("2", "7", "one week", "一周"),
        ONE_MONTH("3", "30", "one month", "一个月");
        private String id;
        @EnumValue
        @JsonValue
        private String value;
        private String longname;
        private String desc;
    }

    @Getter
    @ToString
    @AllArgsConstructor
    @NoArgsConstructor
    public static enum E_REG_CHANNEL {
        APP("1", "app", "APP", "app注册（默认）"),
        H5("2", "h5", "H5", "h5推广注册"),
        EB("3", "eb", "EB", "eb推送注册"),
        PCNC("4", "pcnc", "pcnc", "pcnc"),
        BP("5", "bp", "bp", "boomplay"),
        AIA("6", "aia", "aia", "Add Interest activity");
        private String id;
        @EnumValue
        @JsonValue
        private String value;
        private String longname;
        private String desc;

    }

    @Getter
    @ToString
    @AllArgsConstructor
    @NoArgsConstructor
    public static enum E_APP_ACTIVE_STATUS {
        TO_ACTIVE("1", "0", "TO ACTIVE", "未激活 跳转去人脸验证界面"),
        TO_PIN("2", "1", "TO PIN", "待设置pin码 跳转去ping设置界面"),
        TO_OPEN_ACCTOUNT("3", "2", "TO OPEN ACCTOUNT", "待开户 跳转去开户页面"),
        SUCCESS("4", "3", "SUCCESS", "激活成功");
        private String id;
        @EnumValue
        @JsonValue
        private String value;
        private String longname;
        private String desc;
    }

    @Getter
    @ToString
    @AllArgsConstructor
    @NoArgsConstructor
    public static enum E_IDENTITY_TYPE {
        NORMAL("0", "0", "PROMITER NORMAL", "普通客户"),
        JOINT("1", "1", "JOINT CUSTOMER", "联名客户"),
        SA("2", "2", "PROMITER SA", "推广员SA"),
        SM("3", "3", "PROMITER SM", "推广员SM"),
        EB_BIND("4", "4", "EB BIND ACCT", "EB绑卡客户"),
        STAFF("5", "5", "STAFF", "内部员工"),
        FINANCIAL("6", "6", "FINANCIAL PLANNER", "理财师"),
        FINANCIAL_CUST("7", "7", "FINANCIAL CUSTOMER", "理财客户");

        private String id;
        @EnumValue
        @JsonValue
        private String value;
        private String longname;
        private String desc;

        public static E_IDENTITY_TYPE getIdentityType(String posId, String saId, String smId) {
            if (CommUtil.isNotNull(posId)) {
                return JOINT;
            } else if (CommUtil.isNotNull(saId)) {
                return SA;
            } else if (CommUtil.isNotNull(smId)) {
                return SM;
            } else {
                throw new RuntimeException("找不到身份类型");
            }
        }
    }

    @Getter
    @ToString
    @AllArgsConstructor
    @NoArgsConstructor
    public static enum E_SALE_TYPE {
        PR("1", "PR", "PR", "个人客户"),
        SA("2", "SA", "SA", "推广员SA"),
        SM("3", "SM", "SM", "推广员SM"),
        FI("4", "FI", "FI", "理财师");
        private String id;
        @EnumValue
        @JsonValue
        private String value;
        private String longname;
        private String desc;
    }

    @Getter
    @ToString
    @AllArgsConstructor
    @NoArgsConstructor
    public static enum E_CUSTTYPE {
        PERSON("1", "1", "person", "个人"),
        CORPORATE("2", "2", "corporate", "企业");
        private String id;
        @EnumValue
        @JsonValue
        private String value;
        private String longname;
        private String desc;
    }

    @Getter
    @ToString
    @AllArgsConstructor
    @NoArgsConstructor
    enum E_MARKET_EVENT {

        INVITED_OPEN_ACCT("1", "01", "被邀请人开户成功"),
        DEPOSIT_STATISTICS("2", "02", "存款业绩统计"),
        OPEN_ACCT("3", "03", "客户本人开户"),
        FRIST_DEPOSIT("4", "04", "客户首次存款"),
        INVITED_FRIST_DEPOSIT("5", "05", "被邀请人首次存款"),
        INVITED_DEPOSIT_STATISTICS("6", "06", "被邀请人存款业务统计"),
        IFUM("7", "07", "发起IFUM"),
        INVITED_IFUM("8", "08", "参与IFUM"),
        MANUAL_JOIN("9", "00", "手动参与的活动"),
        INVITED_USER_REGISTER("10", "09", "被邀请人注册成功");

        private String id;
        @EnumValue
        @JsonValue
        private String value;
        private String desc;
    }

    @Getter
    @ToString
    @AllArgsConstructor
    @NoArgsConstructor
    enum E_ADAPT_CUST_IDENTITY {

        EB("1", "1", "EB联名客户"),
        SAORSM("2", "2", "推广员SA/SM"),
        ;

        private String id;
        @EnumValue
        @JsonValue
        private String value;
        private String desc;
    }

    @Getter
    @ToString
    @AllArgsConstructor
    @NoArgsConstructor
    public static enum E_PART_ACTIVITY_STATUS {
        SUCCESS("1", "1", "success", "参与成功"),
        ERROR("2", "2", "Event participation rules not met", "参与失败");
        private String id;
        @EnumValue
        @JsonValue
        private String value;
        private String longname;
        private String desc;
    }

    @Getter
    @ToString
    @AllArgsConstructor
    @NoArgsConstructor
    public static enum E_PART_ACTIVITY_FAIL_REASON {
        ACTIVITY_END("1", "1", "activity end", "活动结束"),
        EVENT_PARTICIPATION_RULES_NOT_MET("2", "2", "Event participation rules not met", "未满足活动参与规则"),
        FULL_PERSON("3", "3", "full person", "已达活动参与人数上限"),
        FULL_COST("4", "4", "full money", "已达活动成本上限");
        private String id;
        @EnumValue
        @JsonValue
        private String value;
        private String longname;
        private String desc;
    }

    @Getter
    @ToString
    @AllArgsConstructor
    @NoArgsConstructor
    enum E_SYSTEM_ID {

        GMB("1", "GMB", "个人银行"),
        GCB("2", "GCB", "企业网银"),
        GMA("3", "GMA", "银行后管"),
        MKS("4", "MKS", "营销服务"),
        PYS("5", "PYS", "支付系统");

        private String id;
        @EnumValue
        @JsonValue
        private String value;
        private String desc;
    }

    @Getter
    @ToString
    @AllArgsConstructor
    @NoArgsConstructor
    enum E_USER_ROLE {
        SUPER_ADMIN("1", "super",  "Super Admin","超级管理员"),
        ACCOUNT_ADMIN("2", "acct",  "Account Manager","账户管理员"),
        COLLECTION_MANAGER("3", "coll", "Collection Operator", "收单运营经理"),
        STORE_MANAGER("4", "store", "Store Manager", "店铺运营经理"),
        ;

        private String id;
        @EnumValue
        @JsonValue
        private String value;
        private String longname;
        private String desc;
    }

    @Getter
    @ToString
    @AllArgsConstructor
    @NoArgsConstructor
    enum E_PAY_CHANNEL {
        NIBBS("NIBSS", "NIBSS", "NIBSS", "NIBSS"),
        PAYSTACK("PAYSTACK", "PAYSTACK", "PAYSTACK", "PAYSTACK"),
        INTERNAL("INTERNAL", "INTERNAL", "INTERNAL", "INTERNAL");
        private String id;
        @EnumValue
        @JsonValue
        private String value;
        private String longname;
        private String desc;
    }

    @Getter
    @ToString
    @AllArgsConstructor
    @NoArgsConstructor
    enum E_MESSAGE_TYPE {
        SHORT_MESSAGE("1", "1", "短信", "short message"),
        EMAIL("2", "2", "邮件", "email"),
        OTP_SHORT_MESSAGE("3", "3", "短信", "otp short message"),
        OTP_EMAIL("4", "4", "邮件", "otp email"),
        OTP_VOICE("5", "5", "语音", "otp voice"),
        ;
        private String id;
        @EnumValue
        @JsonValue
        private String value;
        private String longname;
        private String desc;
    }

    @Getter
    @ToString
    @AllArgsConstructor
    @NoArgsConstructor
    enum E_LOAN_BUSI_TYPE {
        LEND("1", "1", "lend", "放款"),
        REPAYMENT("2", "2", "repayment", "还款"),
        EBLEND("3", "3", "eb lend", "EB放款");
        private String id;
        @EnumValue
        @JsonValue
        private String value;
        private String longname;
        private String desc;
    }

    @Getter
    @ToString
    @AllArgsConstructor
    @NoArgsConstructor
    enum E_BATCH_TRF_BUSI_TYPE implements Serializable {
        BATCH_TRANSFER("1", "1", "upload", "批量转账"),
        PAYROLL("2", "2", "payroll", "代发工资");
        private String id;
        @EnumValue
        @JsonValue
        private String value;
        private String longname;
        private String desc;

        public static E_BATCH_TRF_BUSI_TYPE getObjByValue(String value) {
            for (E_BATCH_TRF_BUSI_TYPE e : values()) {
                if (e.getValue().equals(value)) {
                    return e;
                }
            }
            return null;
        }
    }

    @Getter
    @ToString
    @AllArgsConstructor
    @NoArgsConstructor
    enum E_BATCH_TRF_PROCESS_STATUS {
        INITIALIZE("1", "1", "Original", "初始化"),
        TO_APPROVAL("2", "2", "Waiting Approval", "待审批"),
        REJECT("3", "3", "Review Rejected", "拒绝"),
        DEALING("4", "4", "Processing", "处理中"),
        DONE("5", "5", "Approval completed", "处理完成"),
        PENDING("6", "6", "Pending", "待处理")
        ;
        private String id;
        @EnumValue
        @JsonValue
        private String value;
        private String longname;
        private String desc;
    }

    @Getter
    @ToString
    @AllArgsConstructor
    @NoArgsConstructor
    enum E_LOGIN_METHOD {
        OTP("1", "1", "OTP", "OTP"),
        PASSWORD("2", "2", "PASSWORD", "PASSWORD"),
        ;
        private String id;
        @EnumValue
        @JsonValue
        private String value;
        private String longname;
        private String desc;
    }

    @Getter
    @ToString
    @AllArgsConstructor
    @NoArgsConstructor
    public static enum E_MARKET_EVENT_ID {
        INVITEES_OPEN_ACC_SUCCESS("1", "01", "invitees open account success", "被邀请人开户成功"),
        DEPOSIT_SUM("2", "02", "deposit statistics", "存款业务统计"),
        CUST_OPEN_ACC_SUCCESS("3", "03", "cust open account success", "客户开户成功"),
        CUST_FIRST_DEPOSIT("4", "04", "cust first deposit", "客户首次存款"),
        INVITEES_FIRST_DEPOSIT("5", "05", "invitees first deposit", "被邀请客户首次存款"),
        INVITEES_DEPOSIT_SUM("6", "06", "invitees deposit statistics", "被邀请人存款业务统计"),
        INITIATE_IFUM("7", "07", "initiate ifum", "发起 ifum"),
        JOIB_IFUM("8", "08", "join ifum", "参加 ifum"),
        Add_INTEREST("8", "09", "add interest", "加息劵")
        ;

        private String id;
        @EnumValue
        @JsonValue
        private String value;
        private String longName;
        private String desc;
    }

    @Getter
    @ToString
    @AllArgsConstructor
    @NoArgsConstructor
    public static enum E_ACTIVITY_GRANT_MODE {
        INVITEES_OPEN_ACC_SUCCESS("1", "A", "Automatically issued", "自动发放"),
        DEPOSIT_SUM("2", "B", "Manual collection", "手动领取"),
        CUST_OPEN_ACC_SUCCESS("3", "C", "Delayed issuance", "延迟发放");

        private String id;
        @EnumValue
        @JsonValue
        private String value;
        private String longName;
        private String desc;
    }

    @Getter
    @ToString
    @AllArgsConstructor
    @NoArgsConstructor
    public static enum E_ACTIVITY_STATUS {
        INVITEES_OPEN_ACC_SUCCESS("1", "1", "Normal", "正常"),
        DEPOSIT_SUM("2", "2", "stop", "停用");

        private String id;
        @EnumValue
        @JsonValue
        private String value;
        private String longName;
        private String desc;
    }

    @Getter
    @ToString
    @AllArgsConstructor
    @NoArgsConstructor
    public static enum E_REWARD_TYPE {
        CASH("1", "A", "cash", "现金"),
        RED_ENVELOPE("2", "B", "red envelope", "红包"),
        POINTS("3", "C", "points", "积分"),
        CARD_VOUCHER("4", "D", "card voucher", "卡卷");

        private String id;
        @EnumValue
        @JsonValue
        private String value;
        private String longName;
        private String desc;
    }

    @Getter
    @ToString
    @AllArgsConstructor
    @NoArgsConstructor
    public static enum E_COUPON {
        DEDUCTIBLE("1", "A01", "deductible coupon", "抵扣券"),
        COUPLE("2", "A02", "Coupon", "优惠券"),
        REBATE_COUPON("3", "A03", "Rebate coupon", "返利券"),
        INTEREST_ADD_COUPON("4", "A04", "Interest add coupon", "加息券"),
        INTEREST_INDI_COUPON("5", "A05", "Interest indi coupon", "减息券"),
        FIX_DISOUNT_COUPIN("6", "A06", "Fix Discount Coupon", "定期折扣券"),
        FLEX_DISOUNT_COUPIN("7", "A07", "Flex Discount Coupon", "零钱通折扣券"),
        ;

        private String id;
        @EnumValue
        @JsonValue
        private String value;
        private String longName;
        private String desc;
    }

    @Getter
    @ToString
    @AllArgsConstructor
    @NoArgsConstructor
    public static enum E_COUPON_STATUS {
        NO_USE("0", "0", "Unused", "未使用"),
        EXPIRED("1", "1", "Expired", "已过期"),
        HAD_USE("2", "2", "Used", "已使用"),
        ;

        private String id;
        @EnumValue
        @JsonValue
        private String value;
        private String longname;
        private String desc;
    }

    @Getter
    @ToString
    @AllArgsConstructor
    @NoArgsConstructor
    public static enum E_COUPON_INTEREST_STATUS {
        NO_INTEREST_ACCRUED("0", "0", "no interest accrued", "未计息"),
        INTEREST_CALCULATING("1", "1", "Interest is being calculated", "计息中"),
        INTEREST_SETTLED("2", "2", "Interest settled", "已结息"),
        SETTLED("3", "3", "Settled", "已结算"),
        ;

        private String id;
        @EnumValue
        @JsonValue
        private String value;
        private String longName;
        private String desc;
    }

    @Getter
    @ToString
    @AllArgsConstructor
    @NoArgsConstructor
    enum LOCK_EVENT {
        USER_OPEN_ACCOUNT("1", "USER_OPEN_ACCOUNT:", "USER_OPEN_ACCOUNT"),
        NIBSS_INWARD("2", "NIBSS_INWARD:", "NIBSS INWARD"),
        BATCH_DETAIL_TRF("3", "BATCH_DETAIL_TRF:", "APPROVE BATCH_DETAIL_TRF TRANSFER"),
        APPROVE_BATCH_TRANSFER("4", "APPROVE_BATCH_TRANSFER:", "APPROVE BATCH TRANSFER"),
        BATCH_SETTLE("5", "BATCH_SETTLE:", "BATCH_SETTLE"),
        LOAN_SETTLE("6", "LOAN_SETTLE:", "LOAN_SETTLE"),
        PYS_ORDER("7", "PYS_ORDER:", "PYS_ORDER"),
        BIND_CARD_ORDER("8", "BIND_CARD_ORDER:", "BIND_CARD_ORDER"),
        USER_ADD_OPEN_ACCOUNT("9", "USER_ADD_OPEN_ACCOUNT:", "USER_ADD_OPEN_ACCOUNT"),
        USER_PAYSTACK_CHARGE("10", "PAYSTACK_CHARGE:", "PAYSTACPAYSTACK_CHARGEK_CHARGE"),
        USER_TRANSFER("11", "USER_TRANSFER:", "USER_TRANSFER"),
        BVN_LOCK("12", "BVN_LOCK:", "BVN LOCK"),
        USER_OPEN_ADD_ACCOUNT("13", "USER_OPEN_ADD_ACCOUNT:", "USER_OPEN_ADD_ACCOUNT"),
        BIND_CARD_FEE_ACCOUNTING("14", "BIND_CARD_FEE_ACCOUNTING:", "BIND CARD FEE ACCOUNTING"),
        USER_OPEN_DP_ACCOUNT("15", "USER_OPEN_DP_ACCOUNT:", "USER_OPEN_DP_ACCOUNT"),
        USER_OPEN_VIR_ACCOUNT("16", "USER_OPEN_VIR_ACCOUNT:", "USER_OPEN_VIR_ACCOUNT"),
        MQ_MESSAGE_SEND("17", "MQ_MESSAGE_SEND:", "MQ_MESSAGE_SEND"),
        EB_LOAN_SETTLE("18", "LOAN_SETTLE:", "LOAN_SETTLE"),
        VIR_FEE_ACCTING("19", "VIR_FEE_ACCTING:", "VIR_FEE_ACCTING"),
        PYS_BILL_PAY_ORDER("20", "PYS_ORDER:", "PYS_ORDER"),
        USER_OPEN_LK_SAVINGS("21", "USER_OPEN_LK_SAVINGS:", "USER_OPEN_LK_SAVINGS");
        private String id;
        @EnumValue
        @JsonValue
        private String value;
        private String desc;
    }

    @Getter
    @ToString
    @AllArgsConstructor
    @NoArgsConstructor
    enum E_ADM_STATUS {
        DELETE("1", "0", "DELETE", "DELETE"),
        ACTIVE("2", "1", "ACTIVE", "ACTIVE"),
        DEACTIVE("3", "2", "DEACTIVE", "DEACTIVE"),

        ;
        private String id;
        @EnumValue
        @JsonValue
        private String value;
        private String longName;
        private String desc;
    }


    @Getter
    @ToString
    @AllArgsConstructor
    @NoArgsConstructor
    public static enum E_REWARD_STATUS {
        NON("0", "0", "NON", "待发放"),
        SUCCESS("1", "1", "SUCCESS", "处理成功"),
        FAIL("2", "2", "FAIL", "处理失败");
        private String id;
        @EnumValue
        @JsonValue
        private String value;
        private String longname;
        private String desc;
    }

    @Getter
    @ToString
    @AllArgsConstructor
    @NoArgsConstructor
    public static enum E_GRANT_STATUS {
        SUCCESS("0", "1", "SUCCESS", "发放成功"),
        FAIL("1", "2", "FAIL", "发放失败");
        private String id;
        @EnumValue
        @JsonValue
        private String value;
        private String longname;
        private String desc;
    }

    @Getter
    @ToString
    @AllArgsConstructor
    @NoArgsConstructor
    public static enum E_IFUM_PROGRESS {
        TO_OPEN_ACCOUNT("0", "0", "to open account", "待开户"),
        HAD_OPEN_ACCOUNT("1", "1", "had open account", "已开户"),
        DEPOSITED_BUT_NOT_UP_STANDARD("2", "2", "Deposited but not up to standard", "已存款未达标"),
        DEPOSITED_HAS_REACHED_THE_STANDARD("3", "3", "Deposit has reached the standard", "存款已达标"),
        COMPLTED("4", "4", "completed", "已完成");
        private String id;
        @EnumValue
        @JsonValue
        private String value;
        private String longname;
        private String desc;
    }

    @Getter
    @ToString
    @AllArgsConstructor
    @NoArgsConstructor
    public static enum E_DEAL_STATUS {
        DONE("0", "0", "DONE", "处理完成"),
        TODO("1", "1", "TODO", "待处理"),
        DOING("2", "2", "DOING", "处理中");
        private String id;
        @EnumValue
        @JsonValue
        private String value;
        private String longname;
        private String desc;
    }

    @Getter
    @ToString
    @AllArgsConstructor
    @NoArgsConstructor
    public static enum E_MARKET_ACTIVITY_ID {
        IFUM_LEADER("0", "01", "Invite Friends Unlock Millions", "邀请朋友解锁百万"),
        IFUM_PERSON("1", "02", "Invite Friends Unlock Millions", "邀请朋友解锁百万"),
        INVIT_INVITEE("2", "03", "Invite Friends Unlock Millions", "邀请好友"),
        INVIT_SHAR("3", "04", "Invite Friends Unlock Millions", "邀请好友分享"),
        INVIT_LEADER("4", "05", "Invite Friends Unlock Millions", "邀请好友存款邀请人"),
        INVIT_PERSON("5", "06", "Invite Friends Unlock Millions", "邀请好友存款被邀请人"),
        DEPT_ACTIVE("6", "07", "Invite Friends Unlock Millions", "存款达标"),
        ADD_INTEREST("7", "08", "Add Interest", "加息劵");
        private String id;
        @EnumValue
        @JsonValue
        private String value;
        private String longname;
        private String desc;
    }

    @Getter
    @ToString
    @AllArgsConstructor
    @NoArgsConstructor
    public static enum E_ACTIVITY_EXPERIENCE_TYPE {
        EXPERIENCE_DEPOSIT("1", "1", "Experience Deposit", "体验存款"),
        EXPERIENCE_INTEREST("2", "2", "Ex Interest", "体验利息");
        private String id;
        @EnumValue
        @JsonValue
        private String value;
        private String longname;
        private String desc;
    }

    @Getter
    @ToString
    @AllArgsConstructor
    @NoArgsConstructor
    public static enum E_ACTIVITY_EXPERIENCE_STATUS {
        NO_USE("0", "0", "Unused", "未使用"),
        EXPERIENCING("1", "1", "Experiencing", "体验存款-体验中"),
        CAL_INTEREST("2", "2", "Unsettled", "体验利息-计息"),
        EXPERIENCE_ENDS("3", "3", "Experience ends", "体验存款-体验结束"),
        SETTLED("4", "4", "Settled", "体验利息-结算");
        private String id;
        @EnumValue
        @JsonValue
        private String value;
        private String longname;
        private String desc;
    }

    @Getter
    @ToString
    @AllArgsConstructor
    @NoArgsConstructor
    public static enum E_ORDER_TYPE {
        EBL("1", "1", "eb loan order", "eb贷款放款还款订单"),
        EBI("2", "2", "eb loan interest accounting order", "eb贷款利息计提记账订单"),
        ERI("3", "3", "eb loan repayment interest accounting order", "eb贷款还款利息记账订单"),
        ERP("4", "4", "eb loan repayment principal accounting order", "eb贷款还款本金记账订单"),
        EII("5", "5", "eb loan impairment provision interest accounting order", "eb贷款减值拨备利息记账订单"),
        EIP("6", "6", "eb loan impairment provision principal accounting order", "eb贷款减值拨备本金记账订单"),
        EDI("7", "7", "eb loan debt recovery interest accounting order", "eb贷款坏账回收利息记账订单"),
        EDP("8", "8", "eb loan debt recovery principal accounting order", "eb贷款坏账回收本金记账订单"),
        VPR("9", "9", "vp repayment bonus", "还款金赠送"),
        ;
        private String id;
        @EnumValue
        @JsonValue
        private String value;
        private String longname;
        private String desc;
    }

    @Getter
    @ToString
    @AllArgsConstructor
    @NoArgsConstructor
    public static enum FEE_CYCLE {
        DEND("0", "DEND", "DAY END", "按日"),
        MEND("1", "MEND", "MONTH END", "按月");
        private String id;
        @EnumValue
        @JsonValue
        private String value;
        private String longname;
        private String desc;
    }


    @Getter
    @ToString
    @AllArgsConstructor
    @NoArgsConstructor
    public static enum MKB_INVITEE_EVENT {
        REGISTER("1", "1", "REGISTER", "被邀请人注册成功"),
        OPEN_ACCT("2", "2", "OPEN ACCT", "被邀请人开户成功"),
        DEPOSIT("3", "3", "DEPOSIT", "被邀请人存款"),
        MEMBER_STANDARD("4", "4", "MEMBER STANDARD", "被邀请人达标"),
        LEADER_STANDARD("5", "5", "LEADER STANDARD", "我本人达标"),
        SELF_GET_GOLD("6", "6", "SELF GET GOLD", "我获得体验金");
        private String id;
        @EnumValue
        @JsonValue
        private String value;
        private String longname;
        private String desc;
    }

    @Getter
    @ToString
    @AllArgsConstructor
    @NoArgsConstructor
    public static enum E_USER_QRY_TYPE {
        PHONE("PHONE", "phone", "phone", "手机号"),
        EMAIL("EMAIL", "email", "email", "邮箱"),
        ;

        private String id;
        @EnumValue
        @JsonValue
        private String value;
        private String longname;
        private String desc;
    }

    @Getter
    @ToString
    @AllArgsConstructor
    @NoArgsConstructor
    public static enum E_ADD_INTEREST_RULE {
        //50
        //POINTS： 10% -> 60%
        //PROPORTION 10% -> 15%
        POINTS("1", "01", "points", "点数"),
        PROPORTION("2", "02", "proportion", "比例"),
        ;

        private String id;
        @EnumValue
        @JsonValue
        private String value;
        private String longname;
        private String desc;
    }


    @Getter
    @ToString
    @AllArgsConstructor
    @NoArgsConstructor
    public static enum E_FEE_RATE_METHOD {
        BY_PERCENTAGE("1", "PER", "by percentage", "按照百分比收费"),
        BY_FIXED_AMOUNT("2", "FIX", "by fixed amount", "按照固定金额收费"),
        ;

        private String id;
        @EnumValue
        @JsonValue
        private String value;
        private String longname;
        private String desc;
    }

    @Getter
    @ToString
    @AllArgsConstructor
    @NoArgsConstructor
    public static enum E_BUSINESS_TYPE {
        VPOPEN("1", "VPOPEN", "open integration model", "开放集成的企业"),
        SALE("2", "SALE", "chain store model", "销售型连锁店"),
        ;

        private String id;
        @EnumValue
        @JsonValue
        private String value;
        private String longname;
        private String desc;
    }

    @Getter
    @ToString
    @AllArgsConstructor
    @NoArgsConstructor
    public static enum E_OPERATOR {
        EQUAL("EQUAL", "EQ", "equal"), NO_EQUAL("NO_EQUAL", "NE", "not equal"), IN("IN", "IN", "in"), NO_IN("NO_IN",
                "NI", "not in"), GREATER_THAN("GREATER_THAN", "GT", "greater then"), LESS_THAN("LESS_THAN", "LT",
                "less then"), GREATER_THAN_OR_EQUAL("GREATER_THAN_OR_EQUAL", "GTEQ",
                "greater than or equal to"), LESS_THAN_OR_EQUAL("LESS_THAN_OR_EQUAL", "LTEQ",
                "less than or equal to"), REQULAR_EXPRESSION("REQULAR_EXPRESSION", "EXP",
                "regular expression"), CONTAIN("CONTAIN", "CO",
                "contain"), NOT_CONTAIN("NOT_CONTAIN", "NCO", "not contain");

        private String id;
        @EnumValue
        @JsonValue
        private String value;
        private String longname;
    }

    @Getter
    @ToString
    @AllArgsConstructor
    @NoArgsConstructor
    public static enum E_RULEEXPTYPE {
        COMMON("COMMON", "C", "common expression"), FUNCTION("FUNCTION", "F", "function expression");

        private String id;
        @EnumValue
        @JsonValue
        private String value;
        private String longname;
    }

    @Getter
    @ToString
    @AllArgsConstructor
    @NoArgsConstructor
    enum E_ACCOUNTING_STATUS {
        SUCCESS("0", "0", "SUCCESS", "支付成功"),
        PROCESSING("1", "1", "PROCESSING", "支付中"),
        FAIL("2", "2", "FAIL", "支付失败"),
        CANCEL("3", "3", "CANCEL", "支付取消");
        private String id;
        @EnumValue
        @JsonValue
        private String value;
        private String longname;
        private String desc;

    }
}
